package com.jjh.consts;



/**
 * 返回结果枚举类
 */

public enum ResEnum {

    OK(200,""),

    ERROR(500,"错误"),

    NULL_LOGIN_ERROR(5001,"空错误！"),

    TOKEN_NULL_ERROR(5002,"token为空!"),

    TOKEN_ERROR(5003,"token错误！"),

    TOKEN_EXPIRATION_ERROR(5004,"token过期"),

    TOKEN_REFRESH(666,"刷新token"),

    UN_AUTHENTICATION_ERROR(4001,"未认证！"),

    FILE_UPLOAD_ERROR(5111,"文件上传错误"),
    FILE_DOWNLOAD_ERROR(5112,"文件下载错误00"),
    FILE_DELETE_ERROR(5113,"文件删除错误");



    private final Integer code;

    private final String msg;

    ResEnum(Integer code, String msg) {
       this.code = code;
       this.msg = msg;
    }

    public String getMsg(){
        return this.msg;
    }
    public Integer getCode(){
        return this.code;
    }

    @Override
    public String toString() {
        return "ResEnum{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
